package neusoft.edu.cn.guanshangshiguang.activities;

import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.widget.TextView;

import neusoft.edu.cn.guanshangshiguang.R;

public class shenqingListDetailsActivity extends AppCompatActivity {

    private TextView bname,uname,gender,school,old,copy;
    private AlwaysMarqueeTextView content;
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActionBar actionBar = getSupportActionBar();//去掉标题栏
        actionBar.hide();//去掉标题栏
        setContentView(R.layout.activity_shenqing_list_details);
        init();
        bname.setText(getIntent().getStringExtra("shenqing_bname"));
        uname.setText(getIntent().getStringExtra("uname"));
        school.setText(getIntent().getStringExtra("school"));
        content.setText(getIntent().getStringExtra("content"));
        content.setMovementMethod(ScrollingMovementMethod.getInstance());
        if(getIntent().getStringExtra("gender").toString().equals("1"))
            gender.setText("小哥哥");
        else gender.setText("小姐姐");

        if(getIntent().getStringExtra("copy").toString().equals("1"))
            copy.setText("正版");
        else if(getIntent().getStringExtra("copy").toString().equals("2"))
            copy.setText("珍藏");
        else copy.setText("独家");

        old.setText(getIntent().getStringExtra("old")+"成新");
    }

    private void init() {
        bname=findViewById(R.id.textView100);
        uname=findViewById(R.id.textView120);
        school=findViewById(R.id.textView150);
        gender=findViewById(R.id.textView170);
        copy=findViewById(R.id.textView180);
        old=findViewById(R.id.textView190);
        content=(AlwaysMarqueeTextView)findViewById(R.id.textView200);
    }

}
